Polynomial arithmetic

Polynomial arithmetic includes basic mathematical operations such as addition, subtraction, and multiplication. These operations are defined naturally as if the variable x was an element of S. Division is defined similarly, but requires that S be a field. Examples of fields include rational numbers, Z_p for p prime, and real numbers. The set of all integers is not a field and does not support polynomial division.

Addition and subtraction

Addition and subtraction are performed by adding or subtracting corresponding coefficients. If

f(x) = \sum_{i=0}^n a_ix^i; g(x) = \sum_{i=0}^m b_ix^i

then addition is defined as

f(x)%2Bg(x)= \sum_{i=0}^m (a_i%2Bb_i)x^i where m > n

Multiplication

Multiplication is performed much the same way as addition and subtraction, but instead by multiplying the corresponding coefficients. If f(x) = \sum_{i=0}^n a_ix^i; g(x) = \sum_{i=0}^m b_ix^i then multiplication is defined as f(x)\times g(x)=\sum_{i=0}^{n%2Bm} c_ix^i where c_k=a_0b_k%2Ba_1b_{k-1}%2B\cdots%2Ba_{k-1}b_1%2Ba_kb_0. Note that we treat a_i as zero for i>m and that the degree of the product is equal to the sum of the degrees to the two polynomials.

References